public class PC {
    PC() {};
    PC(CPU cpu) {
        this.cpu = cpu;
        System.out.println(cpu.toString());
    }
    PC(HardDisk HD) {
        this.HD = HD;
        System.out.println(HD.toString());
    }
    PC(CPU cpu,HardDisk HD) {
        this.cpu = cpu;
        this.HD = HD;
    }
    void equals() {}
    CPU cpu;
    HardDisk HD;
    void setCPU(CPU cpu) {
        this.cpu = cpu;
    }
    void setHardDisk(HardDisk HD) {
        this.HD = HD;
    }
    void show() {
        System.out.println("CPU速度:"+cpu.getSpeed());
        System.out.println("硬盘容量:"+HD.getAmount());
    }
}
